package Eyjafjalla.card.attack;

import Eyjafjalla.action.EyjafjallaAttackAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.power.FireMarkPower;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.actions.common.DamageAllEnemiesAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class VolcanoStone_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "VolcanoStone_Eyjafjalla";
    private static final CardStrings cardStrings;

    public VolcanoStone_Eyjafjalla(){
        super(ID, cardStrings.NAME,0,cardStrings.DESCRIPTION,CardType.ATTACK,CardColor.COLORLESS,CardRarity.SPECIAL,CardTarget.ENEMY);
        this.baseDamage = 0;
        this.damage =0;
        this.exhaust = true;
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new VolcanoStone_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new EyjafjallaAttackAction());
        addToBot(new DamageAction(m,new DamageInfo(p,damage,damageTypeForTurn), AbstractGameAction.AttackEffect.FIRE));
        if(isFire()){
            addToBot(new ApplyPowerAction(p,p,new FireMarkPower(p,2),2));
        }
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeDamage(4);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}

